<?php

namespace app\backend\service;
use app\common\model\CategoryModel;
use app\common\model\ContentModel;
use app\common\model\SourceModel;
use app\common\RootService;

class AppContentService extends ContentService
{
    /**
     * 分类列表
     * @return array
     * @throws \think\db\exception\DataNotFoundException
     * @throws \think\db\exception\DbException
     * @throws \think\db\exception\ModelNotFoundException
     */
    protected function categoryList()
    {
        return CategoryModel::field(['id value', 'title name'])->where(['type' => [1, 2]])->order(['rank' => 'asc'])
            ->select()->toArray();
    }

}